//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    list:""
  },
  onLoad: function () {
    wx.request({
      url: 'http://localhost:8080/music',
      method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
      // header: {}, // 设置请求的 header
      success: res=>{
        let list=res.data
        this.setData({
          list:list
        })
        console.log(list);
        // success
      }
    })
  }
})